Skip to content

feat(legacy): add --excluded-services option for log forwarding integrations#20

Open
romainneutron wants to merge 2 commits intomainfrom
cli-100
Open

feat(legacy): add --excluded-services option for log forwarding integrations#20
romainneutron wants to merge 2 commits intomainfrom
cli-100

Conversation

@romainneutron
Copy link
Contributor

Allow users to exclude specific apps/services from log forwarding when adding or updating httplog, newrelic, splunk, sumologic, syslog, and otlplog integrations.

…rations

Allow users to exclude specific apps/services from log forwarding when
adding or updating httplog, newrelic, splunk, sumologic, syslog, and
otlplog integrations.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings March 16, 2026 17:41
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds support in the legacy integration commands for excluding specific services from log forwarding integrations via a new --excluded-services option.

Changes:

  • Introduces an excluded_services ArrayField in the integration form, conditionally available for log-forwarding integration types.
  • Adds PHPUnit coverage to assert the field exists, is correctly typed, and is restricted to the expected integration types.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
legacy/src/Command/Integration/IntegrationCommandBase.php Adds the new excluded_services field and CLI option wiring via the shared form fields.
legacy/tests/Command/Integration/IntegrationCommandBaseTest.php Adds tests validating the new field’s presence and conditional behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment on lines +653 to +662
'excluded_services' => new ArrayField('Excluded services', [
'optionName' => 'excluded-services',
'conditions' => ['type' => [
'httplog',
'newrelic',
'splunk',
'sumologic',
'syslog',
'otlplog',
]],
Comment on lines +54 to +63
$expected = ['httplog', 'newrelic', 'splunk', 'sumologic', 'syslog', 'otlplog'];
$this->assertSame($expected, $conditions['type']);
}

public function testExcludedServicesFieldIncludedForLogForwardingTypes(): void
{
$typeField = $this->fields['type'];
$conditionValues = $this->fields['excluded_services']->getConditions()['type'];
$logTypes = ['httplog', 'newrelic', 'splunk', 'sumologic', 'syslog', 'otlplog'];
foreach ($logTypes as $type) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants